/* 
 *   WWW.COO8.COM  
 */

package com.gm.memberShip.pay.model; 

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;


import java.util.*;
import org.apache.commons.lang.StringUtils;
 

import com.gm.memberShip.pay.model.*;
import com.gm.memberShip.pay.persistence.interfaces.*;
import com.gm.memberShip.pay.business.interfaces.*;  

/**
 * @author  JIANGCHENG
 * @version 1.0
 * @since 1.0
 */


public class Card  implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Card";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_CARD_ID = "cardId";
	public static final String ALIAS_IS_VALUES = "isValues";
	public static final String ALIAS_IS_OPEN = "isOpen";
	public static final String ALIAS_MUST_MONEY = "mustMoney";
	public static final String ALIAS_GAME_POINT = "gamePoint";
	public static final String ALIAS_APPLICATION_ID = "applicationId";
	public static final String ALIAS_CARD_PASSWORD = "cardPassword";
	public static final String ALIAS_BEGIN_DAY = "beginDay";
	public static final String ALIAS_END_DAY = "endDay";
	public static final String ALIAS_ORDER_ID = "orderId";
	public static final String ALIAS_PAY_ID = "payId";
	public static final String ALIAS_PAY_DATE_TIME = "payDateTime";
	
	 
	 
	//columns START
	private java.lang.Integer id;
	private java.lang.String cardId;
	private java.lang.Integer isValues;
	private java.lang.Integer isOpen;
	private java.lang.Long mustMoney;
	private java.lang.Integer gamePoint;
	private java.lang.String applicationId;
	private java.lang.String cardPassword;
	private java.util.Date beginDay;
	private java.util.Date endDay;
	private java.lang.String orderId;
	private java.lang.String payId;
	private java.util.Date payDateTime;
	//columns END

	public Card(){
	}

	public Card(
		java.lang.Integer id
	){
		this.id = id;
	} 
		 
	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
		 
	public void setCardId(java.lang.String value) {
		this.cardId = value;
	}
	
	public java.lang.String getCardId() {
		return this.cardId;
	}
		 
	public void setIsValues(java.lang.Integer value) {
		this.isValues = value;
	}
	
	public java.lang.Integer getIsValues() {
		return this.isValues;
	}
		 
	public void setIsOpen(java.lang.Integer value) {
		this.isOpen = value;
	}
	
	public java.lang.Integer getIsOpen() {
		return this.isOpen;
	}
		 
	public void setMustMoney(java.lang.Long value) {
		this.mustMoney = value;
	}
	
	public java.lang.Long getMustMoney() {
		return this.mustMoney;
	}
		 
	public void setGamePoint(java.lang.Integer value) {
		this.gamePoint = value;
	}
	
	public java.lang.Integer getGamePoint() {
		return this.gamePoint;
	}
		 
	public void setApplicationId(java.lang.String value) {
		this.applicationId = value;
	}
	
	public java.lang.String getApplicationId() {
		return this.applicationId;
	}
		 
	public void setCardPassword(java.lang.String value) {
		this.cardPassword = value;
	}
	
	public java.lang.String getCardPassword() {
		return this.cardPassword;
	}
		 
	public void setBeginDay(java.util.Date value) {
		this.beginDay = value;
	}
	
	public java.util.Date getBeginDay() {
		return this.beginDay;
	}
		 
	public void setEndDay(java.util.Date value) {
		this.endDay = value;
	}
	
	public java.util.Date getEndDay() {
		return this.endDay;
	}
		 
	public void setOrderId(java.lang.String value) {
		this.orderId = value;
	}
	
	public java.lang.String getOrderId() {
		return this.orderId;
	}
		 
	public void setPayId(java.lang.String value) {
		this.payId = value;
	}
	
	public java.lang.String getPayId() {
		return this.payId;
	}
		 
	public void setPayDateTime(java.util.Date value) {
		this.payDateTime = value;
	}
	
	public java.util.Date getPayDateTime() {
		return this.payDateTime;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("CardId",getCardId())
			.append("IsValues",getIsValues())
			.append("IsOpen",getIsOpen())
			.append("MustMoney",getMustMoney())
			.append("GamePoint",getGamePoint())
			.append("ApplicationId",getApplicationId())
			.append("CardPassword",getCardPassword())
			.append("BeginDay",getBeginDay())
			.append("EndDay",getEndDay())
			.append("OrderId",getOrderId())
			.append("PayId",getPayId())
			.append("PayDateTime",getPayDateTime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Card == false) return false;
		if(this == obj) return true;
		Card other = (Card)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

